package za.ac.nmmu.muhelp.model;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;

import org.hibernate.validator.constraints.Length;

/**
 * Entity implementation class for Entity: Role
 * 
 */
@Entity
public class Role implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5757153317464451127L;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true)
	private Long id;

	@Version
	private Long version;

	@Length(max = 256)
	private String name;

	@Length(max=256)
	private String description;

	public Role() {
		super();
		initialize();
	}
	
	void initialize() {
		name=new String();
		description = new String();
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
